package com.molihub;


import com.molihub.component.NettyServer;
import com.molihub.entity.Message;
import com.molihub.service.impl.MessageServiceImpl;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

import java.util.List;

@EnableScheduling
@EnableAsync
@SpringBootApplication(scanBasePackages = "com.molihub")
@ServletComponentScan
public class MolihubWebApplication {

    public static void main(String[] args) {
        SpringApplication.run(MolihubWebApplication.class, args);
        try {
            new NettyServer(8888).start();
        }catch(Exception e) {
            System.out.println("NettyServerError:"+e.getMessage());
        }
    }
}
